package demo.noi;

import java.util.HashSet;
import java.util.Set;

public class P509 {
    public static void main(String[] args) {
        Set<Integer> s = new HashSet<>();
        s.add(1);
        s.add(2);
        if(s.contains(5)){
            System.out.println("有5存在");
        }else {
            System.out.println("没有5存在");
        }

    }

    //f(n)=f(n-1)+f(n-2)
    public int fib(int n) {
        int[] f = new int[100];
        f[0] = 0;
        f[1] = 1;
        for (int i = 2; i < f.length; i++) {
            f[i] = (f[i - 1] + f[i - 2]) % 1000000007;
        }


        Set<Integer> s = new HashSet<>();
        s.add(1);
        s.add(2);
        if(s.contains(5)){
            System.out.println("有5存在");
        }

        return f[n];
    }
}
